﻿<phone:PhoneApplicationPage
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
    xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:local="clr-namespace:cz.burger.windows.MDCCTaxi"
    x:Class="cz.burger.windows.MDCCTaxi.MainPage"
    mc:Ignorable="d"
    FontFamily="{StaticResource PhoneFontFamilyNormal}"
    FontSize="{StaticResource PhoneFontSizeNormal}"
    Foreground="{StaticResource PhoneForegroundBrush}"
    SupportedOrientations="Portrait" Orientation="Portrait"
    shell:SystemTray.IsVisible="True" Margin="0,-2,0,2">

    <Grid x:Name="LayoutRoot" Background="Transparent">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto"/>
            <RowDefinition Height="*"/>
        </Grid.RowDefinitions>

        <!--TitlePanel contains the name of the application and page title-->
        <StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
            <TextBlock Text="TaxiCheck" Margin="9,-7,0,0" Style="{StaticResource PhoneTextTitle1Style}"/>
        </StackPanel>

        <!--ContentPanel - place additional content here-->
        <Grid x:Name="ContentPanel" Grid.Row="1" Margin="10,10,14,-10">
            <Border BorderThickness="0" Background="CadetBlue" Tap="ResultText_OnTap">
                <TextBlock x:Name="ResultText" HorizontalAlignment="Left" Height="80" TextWrapping="Wrap" 
				    Text="{Binding Result}" VerticalAlignment="Top" Width="456"
                    Margin="0" Padding="10,5" />
            </Border>
            <phone:LongListSelector x:Name="RideList" 
                                    ItemsSource="{Binding Rides}"
                                    HorizontalAlignment="Left"
                                    Margin="0,85,0,0" VerticalAlignment="Top" 
                                    Width="456" RenderTransformOrigin="0.5,0.5" 
                                    UseLayoutRounding="False" d:LayoutRounding="Auto">
                <phone:LongListSelector.ItemTemplate>
                    <DataTemplate>
                        <Border Background="{Binding Background}" BorderThickness="0" Margin="10,5">
                            <TextBlock HorizontalAlignment="Left" Height="110" TextWrapping="Wrap" 
				                 Text="{Binding Text}" VerticalAlignment="Top" Width="436" 
                                 Margin="0" Padding="10,5"
                                 Tap ="RideBlock_OnTap"/>
                        </Border>
                    </DataTemplate>
                </phone:LongListSelector.ItemTemplate>
            </phone:LongListSelector>
        </Grid>
    </Grid>

</phone:PhoneApplicationPage>